package com.xmtlxx.tms.domain.bo;

import com.xmtlxx.common.core.domain.BaseEntity;
import com.xmtlxx.common.core.validate.AddGroup;
import com.xmtlxx.common.core.validate.EditGroup;
import com.xmtlxx.system.domain.SysOss;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

/**
 * 车辆业务对象 t_car
 *
 * @author xmtlxx
 * @date 2022-08-15
 */

@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel("车辆业务对象")
public class CarBo extends BaseEntity {

    /**
     * 车辆ID
     */
    @ApiModelProperty(value = "车辆ID")
    private String id;

    /**
     * 承运商ID
     */
    @ApiModelProperty(value = "承运商ID", required = true)
    @NotBlank(message = "承运商ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private String carrierId;

    /**
     * 车牌号
     */
    @ApiModelProperty(value = "车牌号", required = true)
    @NotBlank(message = "车牌号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String carNumber;

    /**
     * 车辆类型
     */
    @ApiModelProperty(value = "车辆类型", required = true)
    @NotBlank(message = "车辆类型不能为空", groups = { AddGroup.class, EditGroup.class })
    private String carType;

    /**
     * 车牌颜色
     */
    @ApiModelProperty(value = "车牌颜色", required = true)
    @NotBlank(message = "车牌颜色不能为空", groups = { AddGroup.class, EditGroup.class })
    private String plateColor;

    /**
     * 合作类型（自有、外协、合同、临时）
     */
    @ApiModelProperty(value = "合作类型（自有、外协、合同、临时）", required = true)
    @NotBlank(message = "合作类型（自有、外协、合同、临时）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String cooperation;

    /**
     * 所有人
     */
    @ApiModelProperty(value = "所有人", required = true)
    @NotBlank(message = "所有人不能为空", groups = { AddGroup.class, EditGroup.class })
    private String ownerName;

    /**
     * 发证机关
     */
    @ApiModelProperty(value = "发证机关")
    private String licenseOrgan;

    /**
     * 车辆识别代号(VIN)
     */
    @ApiModelProperty(value = "车辆识别代号(VIN)", required = true)
    @NotBlank(message = "车辆识别代号(VIN)不能为空", groups = { AddGroup.class, EditGroup.class })
    private String vin;

    /**
     * 发动机号码
     */
    @ApiModelProperty(value = "发动机号码")
    private String engineNo;

    /**
     * 发证日期
     */
    @ApiModelProperty(value = "发证日期", required = true)
    @NotNull(message = "发证日期不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date grantDate;

    /**
     * 总质量（kg）
     */
    @ApiModelProperty(value = "总质量（kg）")
    private String totalMass;

    /**
     * 能源类型
     */
    @ApiModelProperty(value = "能源类型")
    private String energyType;

    /**
     * 核定载人数
     */
    @ApiModelProperty(value = "核定载人数")
    private String passenger;

    /**
     * 核定载质量(kg)
     */
    @ApiModelProperty(value = "核定载质量(kg)")
    private String tonnage;

    /**
     * 准牵引总质量(kg)
     */
    @ApiModelProperty(value = "准牵引总质量(kg)")
    private String tractionMass;

    /**
     * 整备质量(kg)
     */
    @ApiModelProperty(value = "整备质量(kg)")
    private String unladenMass;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;

    /**
     * 车辆状态
     */
    @ApiModelProperty(value = "车辆状态")
    private String status;

    /**
     * 删除标志
     */
    @ApiModelProperty(value = "删除标志")
    private String delFlag;

    /**
     * 所属机构id
     */
    @ApiModelProperty(value = "所属机构id", required = true)
    @NotNull(message = "所属机构id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long deptId;

    /**
     * 所属机构名称
     */
    @ApiModelProperty(value = "所属机构名称")
    private String deptName;

    /**
     * 使用性质
     */
    @ApiModelProperty(value = "使用性质")
    private String useCharacter;

    /**
     * 注册日期
     */
    @ApiModelProperty(value = "注册日期")
    private Date registerDate;

    /**
     * 行驶证正面
     */
    @ApiModelProperty(value = "行驶证正面")
    private String vehicleFrontImg;

    /**
     * 行驶证背面
     */
    @ApiModelProperty(value = "行驶证背面")
    private String vehicleBackImg;

    /**
     * 车辆照片
     */
    @ApiModelProperty(value = "车辆照片")
    private String vehicleImg;

    /**
     * 档案编号
     */
    @ApiModelProperty(value = "档案编号", required = true)
    @NotBlank(message = "档案编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String fileNo;

    private List<SysOss> oss;

    private Long carrierDeptId;
}
